import request from '@/utils/request'

// 查询carmain列表
export function listCarmain(query) {
  return request({
    url: '/business/carmain/list',
    method: 'get',
    params: query
  })
}

// 查询carmain详细
export function getCarmain(id) {
  return request({
    url: '/business/carmain/' + id,
    method: 'get'
  })
}

// 新增carmain
export function addCarmain(data) {
  return request({
    url: '/business/carmain',
    method: 'post',
    data: data
  })
}

// 修改carmain
export function updateCarmain(data) {
  return request({
    url: '/business/carmain',
    method: 'put',
    data: data
  })
}

// 删除carmain
export function delCarmain(id) {
  return request({
    url: '/business/carmain/' + id,
    method: 'delete'
  })
}

// 导出carmain
export function exportCarmain(query) {
  return request({
    url: '/business/carmain/export',
    method: 'get',
    params: query
  })
}